/**
 * 
 */

	function countdown(startTime){
		
		//startTime = startTime.getTime(); //aktuelles Datum
		/*document.write(startTime);
		document.write(" ");
		document.write(build_end);
		*/
		if(startTime>0){
			var hours, minutes, seconds;
			var countdownTime = 0;
			countdownTime = startTime;
			startTime = startTime - 1000;
			if(Math.floor(countdownTime/3600000)!=0){
			hours=Math.floor(countdownTime/3600000);
			
			countdownTime=countdownTime - hours * 3600000;
			} else {
			hours = 0;
			}
			//document.write(hours);
			if(Math.floor(countdownTime/60000)!=0){
			minutes=Math.floor(countdownTime/60000);
			countdownTime = countdownTime - minutes * 60000;
			} else {
			minutes = 0;
			}
			seconds = Math.floor(countdownTime/1000);
			
			//formatting
			(hours!=1)?hours=hours+" часа,  ":hours=hours+" часа,  ";
			  (minutes!=1)?minutes=minutes+" минут и ":minutes=minutes+" минут  и  ";
			  if(seconds<10) seconds="0"+seconds;
			  (seconds!=1)?seconds=seconds+" секунд":seconds=seconds+" секунд";

			  
			  
			  document.countdownform.countdowninput.value=hours+minutes+seconds;
			  setTimeout("countdown("+startTime+")", 1000);
		} else document.countdownform.countdowninput.value=
				"построено";
	}